//package com.white.androidstudy.ss;
//
///**
// * Created by ytf on 2017/12/6 006.
// * Description:
// */
//
//import android.content.Context;
//import android.content.res.Resources;
//import android.graphics.Bitmap;
//import android.graphics.Bitmap.Config;
//import android.graphics.BitmapFactory;
//import android.graphics.Canvas;
//import android.graphics.ColorMatrix;
//import android.graphics.ColorMatrixColorFilter;
//import android.graphics.Matrix;
//import android.graphics.Paint;
//import android.graphics.Paint.FontMetrics;
//import android.graphics.Paint.Style;
//import android.graphics.PointF;
//import android.graphics.Rect;
//import android.graphics.Region.Op;
//import android.graphics.Shader.TileMode;
//import android.graphics.drawable.BitmapDrawable;
//import android.graphics.drawable.Drawable;
//import android.graphics.drawable.GradientDrawable;
//import android.graphics.drawable.GradientDrawable.Orientation;
//import android.os.Handler;
//import android.os.Message;
//import android.text.TextUtils;
//import android.util.AttributeSet;
//import android.util.Log;
//import android.util.TypedValue;
//import android.view.MotionEvent;
//import android.view.View;
//import android.widget.Scroller;
//
//public class PaperWidget
//        extends View
//{
//    protected static final int ANIMATE_TIME_OTHER = 1000;
//    protected static final int ANIMATE_TIME_PAPER = 1300;
//    public static final int ANI_AUTO = 6;
//    public static final int ANI_BLOW = 5;
//    public static final int ANI_COVER_X = 2;
//    public static final int ANI_DRAG_Y = 3;
//    public static final int ANI_MOVE_X = 4;
//    public static final int ANI_NONE = 0;
//    public static final int ANI_PAPER = 1;
//    public static final int CURRENT = 0;
//    public static final int FIRST = -99;
//    public static final int LAST = 99;
//    public static final int NEXT = 1;
//    public static final int PREVIOUS = -1;
//    public static final int SHOW_SPEED_TIMES = 10;
//    public static int i_VolumePress = 0;
//    public static boolean speadAutoReadParse = false;
//    public int animateType = 2;
//    protected Handler animationHandler = new Handler()
//    {
//        public void handleMessage(Message paramAnonymousMessage)
//        {
//            if (paramAnonymousMessage.what == 1) {
//                PaperWidget.this.computeScroll();
//            }
//        }
//    };
//    private Bitmap autoLine = null;
//    private int autoLineHeightOffset = 0;
//    public float autoReadRawSpeed = 0.0F;
//    protected float autoReadYOffset = 0.0F;
//    protected Drawable backgroundBitmap = null;
//    private boolean backgroundBitmapIsTiled = true;
//    private String backgroundBitmapName = null;
//    protected int backgroundColor;
//    private boolean backgroundUsedBitmap = true;
//    private Rect currentBitmapRect = null;
//    private Paint.FontMetrics fm = null;
//    int[] mBackShadowColors;
//    GradientDrawable mBackShadowDrawableBT;
//    GradientDrawable mBackShadowDrawableLR;
//    GradientDrawable mBackShadowDrawableRL;
//    GradientDrawable mBackShadowDrawableTB;
//    private final PointF mBezierControl1 = new PointF();
//    PointF mBezierControl2 = new PointF();
//    private PointF mBezierEnd1 = new PointF();
//    PointF mBezierEnd2 = new PointF();
//    private final PointF mBezierStart1 = new PointF();
//    PointF mBezierStart2 = new PointF();
//    private final PointF mBeziervertex1 = new PointF();
//    PointF mBeziervertex2 = new PointF();
//    ColorMatrixColorFilter mColorMatrixFilter;
//    private final PointF mCorner = new PointF();
//    protected Bitmap mCurPageBitmap = null;
//    public int mCurrentOrientation;
//    float mDegrees;
//    GradientDrawable mFolderShadowDrawableBT;
//    GradientDrawable mFolderShadowDrawableLR;
//    GradientDrawable mFolderShadowDrawableRL;
//    GradientDrawable mFolderShadowDrawableTB;
//    int[] mFrontShadowColors;
//    GradientDrawable mFrontShadowDrawableHBT;
//    GradientDrawable mFrontShadowDrawableHTB;
//    GradientDrawable mFrontShadowDrawableVLR;
//    GradientDrawable mFrontShadowDrawableVRL;
//    public int mHeight = -1;
//    boolean mIsRTandLB;
//    Matrix mMatrix;
//    float[] mMatrixArray = { 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F };
//    float mMaxLength = (float)Math.hypot(this.mWidth, this.mHeight);
//    float mMiddleX;
//    float mMiddleY;
//    protected Bitmap mNextPageBitmap = null;
//    protected Canvas mPageCanvas = null;
//    Paint mPaint;
//    private Path mPath0;
//    private Path mPath1;
//    private PointF mPressed = new PointF();
//    public Scroller mScroller;
//    private PointF mTouch = new PointF();
//    float mTouchToCornerDis;
//    public int mWidth = -1;
//    public int motionEventAction = -1;
//    public boolean moveFirst;
//    int s;
//    private Bitmap showSpeedBG = null;
//    private Paint showSpeedPaint = null;
//
//    public PaperWidget(Context paramContext)
//    {
//        super(paramContext);
//        init();
//    }
//
//    public PaperWidget(Context paramContext, AttributeSet paramAttributeSet)
//    {
//        super(paramContext, paramAttributeSet);
//        init();
//    }
//
//    public PaperWidget(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
//    {
//        super(paramContext, paramAttributeSet, paramInt);
//        init();
//    }
//
//    private void calcPoints()
//    {
//        this.mMiddleX = ((this.mTouch.x + this.mCorner.x) / 2.0F);
//        this.mMiddleY = ((this.mTouch.y + this.mCorner.y) / 2.0F);
//        this.mBezierControl1.x = (this.mMiddleX - (this.mCorner.y - this.mMiddleY) * (this.mCorner.y - this.mMiddleY) / (this.mCorner.x - this.mMiddleX));
//        this.mBezierControl1.y = this.mCorner.y;
//        this.mBezierControl2.x = this.mCorner.x;
//        this.mBezierControl2.y = (this.mMiddleY - (this.mCorner.x - this.mMiddleX) * (this.mCorner.x - this.mMiddleX) / (this.mCorner.y - this.mMiddleY));
//        this.mBezierStart1.x = (this.mBezierControl1.x - (this.mCorner.x - this.mBezierControl1.x) / 2.0F);
//        this.mBezierStart1.y = this.mCorner.y;
//        if ((this.mTouch.x > 0.0F) && (this.mTouch.x < this.mWidth) && ((this.mBezierStart1.x < 0.0F) || (this.mBezierStart1.x > this.mWidth)))
//        {
//            if (this.mBezierStart1.x < 0.0F) {
//                this.mBezierStart1.x = (this.mWidth - this.mBezierStart1.x);
//            }
//            float f1 = Math.abs(this.mCorner.x - this.mTouch.x);
//            float f2 = this.mWidth * f1 / this.mBezierStart1.x;
//            this.mTouch.x = Math.abs(this.mCorner.x - f2);
//            f1 = Math.abs(this.mCorner.x - this.mTouch.x) * Math.abs(this.mCorner.y - this.mTouch.y) / f1;
//            this.mTouch.y = Math.abs(this.mCorner.y - f1);
//            this.mMiddleX = ((this.mTouch.x + this.mCorner.x) / 2.0F);
//            this.mMiddleY = ((this.mTouch.y + this.mCorner.y) / 2.0F);
//            this.mBezierControl1.x = (this.mMiddleX - (this.mCorner.y - this.mMiddleY) * (this.mCorner.y - this.mMiddleY) / (this.mCorner.x - this.mMiddleX));
//            this.mBezierControl1.y = this.mCorner.y;
//            this.mBezierControl2.x = this.mCorner.x;
//            this.mBezierControl2.y = (this.mMiddleY - (this.mCorner.x - this.mMiddleX) * (this.mCorner.x - this.mMiddleX) / (this.mCorner.y - this.mMiddleY));
//            this.mBezierStart1.x = (this.mBezierControl1.x - (this.mCorner.x - this.mBezierControl1.x) / 2.0F);
//        }
//        this.mBezierStart2.x = this.mCorner.x;
//        this.mBezierStart2.y = (this.mBezierControl2.y - (this.mCorner.y - this.mBezierControl2.y) / 2.0F);
//        this.mTouchToCornerDis = ((float)Math.hypot(this.mTouch.x - this.mCorner.x, this.mTouch.y - this.mCorner.y));
//        this.mBezierEnd1 = getCross(this.mTouch, this.mBezierControl1, this.mBezierStart1, this.mBezierStart2);
//        this.mBezierEnd2 = getCross(this.mTouch, this.mBezierControl2, this.mBezierStart1, this.mBezierStart2);
//        this.mBeziervertex1.x = ((this.mBezierStart1.x + this.mBezierControl1.x * 2.0F + this.mBezierEnd1.x) / 4.0F);
//        this.mBeziervertex1.y = ((this.mBezierControl1.y * 2.0F + this.mBezierStart1.y + this.mBezierEnd1.y) / 4.0F);
//        this.mBeziervertex2.x = ((this.mBezierStart2.x + this.mBezierControl2.x * 2.0F + this.mBezierEnd2.x) / 4.0F);
//        this.mBeziervertex2.y = ((this.mBezierControl2.y * 2.0F + this.mBezierStart2.y + this.mBezierEnd2.y) / 4.0F);
//    }
//
//    private void calcPointsBlow()
//    {
//        this.mMiddleX = ((this.mTouch.x + this.mCorner.x) / 2.0F);
//        this.mMiddleY = ((this.mTouch.y + this.mCorner.y) / 2.0F);
//        this.mBezierControl1.x = (this.mMiddleX - (this.mCorner.y - this.mMiddleY) * (this.mCorner.y - this.mMiddleY) / (this.mCorner.x - this.mMiddleX));
//        this.mBezierControl1.y = this.mCorner.y;
//        this.mBezierControl2.x = this.mCorner.x;
//        this.mBezierControl2.y = (this.mMiddleY - (this.mCorner.x - this.mMiddleX) * (this.mCorner.x - this.mMiddleX) / (this.mCorner.y - this.mMiddleY));
//        this.mBezierStart2.x = this.mCorner.x;
//        this.mBezierStart2.y = (this.mBezierControl2.y - (this.mCorner.y - this.mBezierControl2.y) / 2.0F);
//        if ((this.mTouch.y > 0.0F) && (this.mTouch.y < this.mHeight) && ((this.mBezierStart2.y < 0.0F) || (this.mBezierStart2.y > this.mHeight)))
//        {
//            if (this.mBezierStart2.y < 0.0F) {
//                this.mBezierStart2.y = (this.mHeight - this.mBezierStart2.y);
//            }
//            float f1 = Math.abs(this.mCorner.y - this.mTouch.y);
//            float f2 = this.mHeight * f1 / this.mBezierStart2.y;
//            this.mTouch.y = Math.abs(this.mCorner.y - f2);
//            f1 = Math.abs(this.mCorner.y - this.mTouch.y) * Math.abs(this.mCorner.x - this.mTouch.x) / f1;
//            this.mTouch.x = Math.abs(this.mCorner.x - f1);
//            this.mMiddleX = ((this.mTouch.x + this.mCorner.x) / 2.0F);
//            this.mMiddleY = ((this.mTouch.y + this.mCorner.y) / 2.0F);
//            this.mBezierControl1.x = (this.mMiddleX - (this.mCorner.y - this.mMiddleY) * (this.mCorner.y - this.mMiddleY) / (this.mCorner.x - this.mMiddleX));
//            this.mBezierControl1.y = this.mCorner.y;
//            this.mBezierControl2.x = this.mCorner.x;
//            this.mBezierControl2.y = (this.mMiddleY - (this.mCorner.x - this.mMiddleX) * (this.mCorner.x - this.mMiddleX) / (this.mCorner.y - this.mMiddleY));
//            this.mBezierStart2.y = (this.mBezierControl2.y - (this.mCorner.y - this.mBezierControl2.y) / 2.0F);
//        }
//        this.mBezierStart1.x = (this.mBezierControl1.x - (this.mCorner.x - this.mBezierControl1.x) / 2.0F);
//        this.mBezierStart1.y = this.mCorner.y;
//        this.mTouchToCornerDis = ((float)Math.hypot(this.mTouch.x - this.mCorner.x, this.mTouch.y - this.mCorner.y));
//        this.mBezierEnd1 = getCross(this.mTouch, this.mBezierControl1, this.mBezierStart1, this.mBezierStart2);
//        this.mBezierEnd2 = getCross(this.mTouch, this.mBezierControl2, this.mBezierStart1, this.mBezierStart2);
//        this.mBeziervertex1.x = ((this.mBezierStart1.x + this.mBezierControl1.x * 2.0F + this.mBezierEnd1.x) / 4.0F);
//        this.mBeziervertex1.y = ((this.mBezierControl1.y * 2.0F + this.mBezierStart1.y + this.mBezierEnd1.y) / 4.0F);
//        this.mBeziervertex2.x = ((this.mBezierStart2.x + this.mBezierControl2.x * 2.0F + this.mBezierEnd2.x) / 4.0F);
//        this.mBeziervertex2.y = ((this.mBezierControl2.y * 2.0F + this.mBezierStart2.y + this.mBezierEnd2.y) / 4.0F);
//    }
//
//    private void createDrawable()
//    {
//        int[] arrayOfInt = new int[2];
//        int[] tmp5_4 = arrayOfInt;
//        tmp5_4[0] = 3355443;
//        int[] tmp10_5 = tmp5_4;
//        tmp10_5[1] = -1338821837;
//        tmp10_5;
//        this.mFolderShadowDrawableRL = new GradientDrawable(GradientDrawable.Orientation.RIGHT_LEFT, arrayOfInt);
//        this.mFolderShadowDrawableRL.setGradientType(0);
//        this.mFolderShadowDrawableLR = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, arrayOfInt);
//        this.mFolderShadowDrawableLR.setGradientType(0);
//        this.mFolderShadowDrawableTB = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, arrayOfInt);
//        this.mFolderShadowDrawableTB.setGradientType(0);
//        this.mFolderShadowDrawableBT = new GradientDrawable(GradientDrawable.Orientation.BOTTOM_TOP, arrayOfInt);
//        this.mFolderShadowDrawableBT.setGradientType(0);
//        this.mBackShadowColors = new int[] { -15658735, 1118481 };
//        this.mBackShadowDrawableRL = new GradientDrawable(GradientDrawable.Orientation.RIGHT_LEFT, this.mBackShadowColors);
//        this.mBackShadowDrawableRL.setGradientType(0);
//        this.mBackShadowDrawableLR = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, this.mBackShadowColors);
//        this.mBackShadowDrawableLR.setGradientType(0);
//        this.mBackShadowDrawableTB = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, this.mBackShadowColors);
//        this.mBackShadowDrawableTB.setGradientType(0);
//        this.mBackShadowDrawableBT = new GradientDrawable(GradientDrawable.Orientation.BOTTOM_TOP, this.mBackShadowColors);
//        this.mBackShadowDrawableBT.setGradientType(0);
//        this.mFrontShadowColors = new int[] { -2146365167, 1118481 };
//        this.mFrontShadowDrawableVLR = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, this.mFrontShadowColors);
//        this.mFrontShadowDrawableVLR.setGradientType(0);
//        this.mFrontShadowDrawableVRL = new GradientDrawable(GradientDrawable.Orientation.RIGHT_LEFT, this.mFrontShadowColors);
//        this.mFrontShadowDrawableVRL.setGradientType(0);
//        this.mFrontShadowDrawableHTB = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, this.mFrontShadowColors);
//        this.mFrontShadowDrawableHTB.setGradientType(0);
//        this.mFrontShadowDrawableHBT = new GradientDrawable(GradientDrawable.Orientation.BOTTOM_TOP, this.mFrontShadowColors);
//        this.mFrontShadowDrawableHBT.setGradientType(0);
//    }
//
//    private void drawCurrentBackArea(Canvas paramCanvas, Bitmap paramBitmap)
//    {
//        float f1 = Math.min(Math.abs((int)(this.mBezierStart1.x + this.mBezierControl1.x) / 2 - this.mBezierControl1.x), Math.abs((int)(this.mBezierStart2.y + this.mBezierControl2.y) / 2 - this.mBezierControl2.y));
//        this.mPath1.reset();
//        this.mPath1.moveTo(this.mBeziervertex2.x, this.mBeziervertex2.y);
//        this.mPath1.lineTo(this.mBeziervertex1.x, this.mBeziervertex1.y);
//        this.mPath1.lineTo(this.mBezierEnd1.x, this.mBezierEnd1.y);
//        this.mPath1.lineTo(this.mTouch.x, this.mTouch.y);
//        this.mPath1.lineTo(this.mBezierEnd2.x, this.mBezierEnd2.y);
//        this.mPath1.close();
//        int i;
//        int j;
//        if (this.mIsRTandLB)
//        {
//            i = (int)this.mBezierStart1.x;
//            j = (int)(this.mBezierStart1.x + f1 + 4.0F);
//        }
//        for (GradientDrawable localGradientDrawable = this.mFolderShadowDrawableLR;; localGradientDrawable = this.mFolderShadowDrawableRL)
//        {
//            paramCanvas.save();
//            paramCanvas.clipPath(this.mPath0);
//            paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//            this.mPaint.setColorFilter(this.mColorMatrixFilter);
//            float f2 = (float)Math.hypot(this.mCorner.x - this.mBezierControl1.x, this.mBezierControl2.y - this.mCorner.y);
//            f1 = (this.mCorner.x - this.mBezierControl1.x) / f2;
//            f2 = (this.mBezierControl2.y - this.mCorner.y) / f2;
//            this.mMatrixArray[0] = (1.0F - 2.0F * f2 * f2);
//            this.mMatrixArray[1] = (2.0F * f1 * f2);
//            this.mMatrixArray[3] = this.mMatrixArray[1];
//            this.mMatrixArray[4] = (1.0F - 2.0F * f1 * f1);
//            this.mMatrix.reset();
//            this.mMatrix.setValues(this.mMatrixArray);
//            this.mMatrix.preTranslate(-this.mBezierControl1.x, -this.mBezierControl1.y);
//            this.mMatrix.postTranslate(this.mBezierControl1.x, this.mBezierControl1.y);
//            paramCanvas.drawBitmap(paramBitmap, this.mMatrix, this.mPaint);
//            this.mPaint.setColorFilter(null);
//            paramCanvas.rotate(this.mDegrees, this.mBezierStart1.x, this.mBezierStart1.y);
//            localGradientDrawable.setBounds(i, (int)this.mBezierStart1.y, j, (int)(this.mBezierStart1.y + this.mMaxLength));
//            localGradientDrawable.draw(paramCanvas);
//            paramCanvas.restore();
//            return;
//            i = (int)(this.mBezierStart1.x - f1 - 4.0F);
//            j = (int)this.mBezierStart1.x;
//        }
//    }
//
//    private void drawCurrentBackAreaBlow(Canvas paramCanvas, Bitmap paramBitmap)
//    {
//        this.mPath1.reset();
//        this.mPath1.moveTo(this.mBeziervertex2.x, this.mBeziervertex2.y);
//        this.mPath1.lineTo(this.mBeziervertex1.x, this.mBeziervertex1.y);
//        this.mPath1.lineTo(this.mBezierEnd1.x, this.mBezierEnd1.y);
//        this.mPath1.lineTo(this.mTouch.x, this.mTouch.y);
//        this.mPath1.lineTo(this.mBezierEnd2.x, this.mBezierEnd2.y);
//        this.mPath1.close();
//        paramCanvas.save();
//        paramCanvas.clipPath(this.mPath0);
//        paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//        this.mPaint.setColorFilter(this.mColorMatrixFilter);
//        float f2 = (float)Math.hypot(this.mCorner.x - this.mBezierControl1.x, this.mBezierControl2.y - this.mCorner.y);
//        float f1 = (this.mCorner.x - this.mBezierControl1.x) / f2;
//        f2 = (this.mBezierControl2.y - this.mCorner.y) / f2;
//        this.mMatrixArray[0] = (1.0F - 2.0F * f2 * f2);
//        this.mMatrixArray[1] = (2.0F * f1 * f2);
//        this.mMatrixArray[3] = this.mMatrixArray[1];
//        this.mMatrixArray[4] = (1.0F - 2.0F * f1 * f1);
//        this.mMatrix.reset();
//        this.mMatrix.setValues(this.mMatrixArray);
//        this.mMatrix.preTranslate(-this.mBezierControl1.x, -this.mBezierControl1.y);
//        this.mMatrix.postTranslate(this.mBezierControl1.x, this.mBezierControl1.y);
//        paramCanvas.drawBitmap(paramBitmap, this.mMatrix, this.mPaint);
//        this.mPaint.setColorFilter(null);
//        f1 = Math.min(Math.abs((int)(this.mBezierStart1.x + this.mBezierControl1.x) / 2 - this.mBezierControl1.x), Math.abs((int)(this.mBezierStart2.y + this.mBezierControl2.y) / 2 - this.mBezierControl2.y));
//        int j;
//        int i;
//        if (this.mIsRTandLB)
//        {
//            j = (int)this.mBezierStart2.y;
//            i = (int)(this.mBezierStart2.y + f1 + 4.0F);
//        }
//        for (paramBitmap = this.mFolderShadowDrawableTB;; paramBitmap = this.mFolderShadowDrawableBT)
//        {
//            paramCanvas.rotate(this.mDegrees, this.mBezierStart2.x, this.mBezierStart2.y);
//            paramBitmap.setBounds((int)this.mBezierStart2.x, j, (int)(this.mBezierStart2.x + this.mMaxLength), i);
//            paramBitmap.draw(paramCanvas);
//            paramCanvas.restore();
//            return;
//            j = (int)(this.mBezierStart2.y - f1 - 4.0F);
//            i = (int)this.mBezierStart2.y;
//        }
//    }
//
//    private void drawCurrentPageArea(Canvas paramCanvas, Bitmap paramBitmap, Path paramPath)
//    {
//        if ((this.mBezierEnd1.x == (0.0F / 0.0F)) || (this.mBezierEnd1.y == (0.0F / 0.0F))) {
//            return;
//        }
//        this.mPath0.reset();
//        this.mPath0.moveTo(this.mBezierStart1.x, this.mBezierStart1.y);
//        this.mPath0.quadTo(this.mBezierControl1.x, this.mBezierControl1.y, this.mBezierEnd1.x, this.mBezierEnd1.y);
//        this.mPath0.lineTo(this.mTouch.x, this.mTouch.y);
//        this.mPath0.lineTo(this.mBezierEnd2.x, this.mBezierEnd2.y);
//        this.mPath0.quadTo(this.mBezierControl2.x, this.mBezierControl2.y, this.mBezierStart2.x, this.mBezierStart2.y);
//        this.mPath0.lineTo(this.mCorner.x, this.mCorner.y);
//        this.mPath0.close();
//        paramCanvas.save();
//        paramCanvas.clipPath(paramPath, Region.Op.XOR);
//        paramCanvas.drawBitmap(paramBitmap, 0.0F, 0.0F, null);
//        paramCanvas.restore();
//    }
//
//    private void drawCurrentPageShadow(Canvas paramCanvas)
//    {
//        double d1;
//        float f1;
//        label100:
//        int i;
//        int j;
//        GradientDrawable localGradientDrawable;
//        if (this.mIsRTandLB)
//        {
//            d1 = 0.7853981633974483D - Math.atan2(this.mBezierControl1.y - this.mTouch.y, this.mTouch.x - this.mBezierControl1.x);
//            double d2 = Math.cos(d1);
//            d1 = 21.209999999999997D * Math.sin(d1);
//            float f2 = (float)(this.mTouch.x + 21.209999999999997D * d2);
//            if (!this.mIsRTandLB) {
//                break label710;
//            }
//            f1 = (float)(this.mTouch.y + d1);
//            this.mPath1.reset();
//            this.mPath1.moveTo(f2, f1);
//            this.mPath1.lineTo(this.mTouch.x, this.mTouch.y);
//            this.mPath1.lineTo(this.mBezierControl1.x, this.mBezierControl1.y);
//            this.mPath1.lineTo(this.mBezierStart1.x, this.mBezierStart1.y);
//            this.mPath1.close();
//            paramCanvas.save();
//            paramCanvas.clipPath(this.mPath0, Region.Op.XOR);
//            paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//            if (!this.mIsRTandLB) {
//                break label726;
//            }
//            i = (int)this.mBezierControl1.x;
//            j = (int)this.mBezierControl1.x + 15;
//            localGradientDrawable = this.mFrontShadowDrawableVLR;
//            label253:
//            paramCanvas.rotate((float)Math.toDegrees(Math.atan2(this.mTouch.x - this.mBezierControl1.x, this.mBezierControl1.y - this.mTouch.y)), this.mBezierControl1.x, this.mBezierControl1.y);
//            localGradientDrawable.setBounds(i, (int)(this.mBezierControl1.y - this.mMaxLength), j, (int)this.mBezierControl1.y);
//            localGradientDrawable.draw(paramCanvas);
//            paramCanvas.restore();
//            this.mPath1.reset();
//            this.mPath1.moveTo(f2, f1);
//            this.mPath1.lineTo(this.mTouch.x, this.mTouch.y);
//            this.mPath1.lineTo(this.mBezierControl2.x, this.mBezierControl2.y);
//            this.mPath1.lineTo(this.mBezierStart2.x, this.mBezierStart2.y);
//            this.mPath1.close();
//            paramCanvas.save();
//            paramCanvas.clipPath(this.mPath0, Region.Op.XOR);
//            paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//            if (!this.mIsRTandLB) {
//                break label761;
//            }
//            i = (int)this.mBezierControl2.y;
//            j = (int)(this.mBezierControl2.y + 15.0F);
//            localGradientDrawable = this.mFrontShadowDrawableHTB;
//            label504:
//            paramCanvas.rotate((float)Math.toDegrees(Math.atan2(this.mBezierControl2.y - this.mTouch.y, this.mBezierControl2.x - this.mTouch.x)), this.mBezierControl2.x, this.mBezierControl2.y);
//            if (this.mBezierControl2.y >= 0.0F) {
//                break label796;
//            }
//            f1 = this.mBezierControl2.y - this.mHeight;
//            label588:
//            int k = (int)Math.hypot(this.mBezierControl2.x, f1);
//            if (k <= this.mMaxLength) {
//                break label808;
//            }
//            localGradientDrawable.setBounds((int)(this.mBezierControl2.x - 15.0F) - k, i, (int)(this.mBezierControl2.x + this.mMaxLength) - k, j);
//        }
//        for (;;)
//        {
//            localGradientDrawable.draw(paramCanvas);
//            paramCanvas.restore();
//            return;
//            d1 = 0.7853981633974483D - Math.atan2(this.mTouch.y - this.mBezierControl1.y, this.mTouch.x - this.mBezierControl1.x);
//            break;
//            label710:
//            f1 = (float)(this.mTouch.y - d1);
//            break label100;
//            label726:
//            i = (int)(this.mBezierControl1.x - 15.0F);
//            j = (int)this.mBezierControl1.x + 1;
//            localGradientDrawable = this.mFrontShadowDrawableVRL;
//            break label253;
//            label761:
//            i = (int)(this.mBezierControl2.y - 15.0F);
//            j = (int)(this.mBezierControl2.y + 1.0F);
//            localGradientDrawable = this.mFrontShadowDrawableHBT;
//            break label504;
//            label796:
//            f1 = this.mBezierControl2.y;
//            break label588;
//            label808:
//            localGradientDrawable.setBounds((int)(this.mBezierControl2.x - this.mMaxLength), i, (int)this.mBezierControl2.x, j);
//        }
//    }
//
//    private void drawCurrentPageShadowBlow(Canvas paramCanvas)
//    {
//        double d1;
//        float f1;
//        label100:
//        int i;
//        int j;
//        GradientDrawable localGradientDrawable;
//        label253:
//        int k;
//        if (this.mIsRTandLB)
//        {
//            d1 = 0.7853981633974483D - Math.atan2(this.mBezierControl1.y - this.mTouch.y, this.mTouch.x - this.mBezierControl1.x);
//            double d2 = Math.cos(d1);
//            d1 = 21.209999999999997D * Math.sin(d1);
//            float f2 = (float)(this.mTouch.x + 21.209999999999997D * d2);
//            if (!this.mIsRTandLB) {
//                break label791;
//            }
//            f1 = (float)(this.mTouch.y + d1);
//            this.mPath1.reset();
//            this.mPath1.moveTo(f2, f1);
//            this.mPath1.lineTo(this.mTouch.x, this.mTouch.y);
//            this.mPath1.lineTo(this.mBezierControl1.x, this.mBezierControl1.y);
//            this.mPath1.lineTo(this.mBezierStart1.x, this.mBezierStart1.y);
//            this.mPath1.close();
//            paramCanvas.save();
//            paramCanvas.clipPath(this.mPath0, Region.Op.XOR);
//            paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//            if (!this.mIsRTandLB) {
//                break label807;
//            }
//            i = (int)this.mBezierControl1.x;
//            j = (int)this.mBezierControl1.x + 15;
//            localGradientDrawable = this.mFrontShadowDrawableVLR;
//            paramCanvas.rotate((float)Math.toDegrees(Math.atan2(this.mTouch.x - this.mBezierControl1.x, this.mBezierControl1.y - this.mTouch.y)), this.mBezierControl1.x, this.mBezierControl1.y);
//            k = (int)Math.sqrt((this.mTouch.x - this.mBezierControl1.x) * (this.mTouch.x - this.mBezierControl1.x) + (this.mBezierControl1.y - this.mTouch.y) * (this.mBezierControl1.y - this.mTouch.y));
//            if (this.mBezierControl1.y > 2.0F) {
//                break label842;
//            }
//            k = k * -1 - 15;
//            label401:
//            localGradientDrawable.setBounds(i, k, j, (int)(k + this.mMaxLength));
//            localGradientDrawable.draw(paramCanvas);
//            paramCanvas.restore();
//            this.mPath1.reset();
//            this.mPath1.moveTo(f2, f1);
//            this.mPath1.lineTo(this.mTouch.x, this.mTouch.y);
//            this.mPath1.lineTo(this.mBezierControl2.x, this.mBezierControl2.y);
//            this.mPath1.lineTo(this.mBezierStart2.x, this.mBezierStart2.y);
//            this.mPath1.close();
//            paramCanvas.save();
//            paramCanvas.clipPath(this.mPath0, Region.Op.XOR);
//            paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//            if (!this.mIsRTandLB) {
//                break label861;
//            }
//            i = (int)this.mBezierControl2.y;
//            j = (int)(this.mBezierControl2.y + 15.0F);
//            localGradientDrawable = this.mFrontShadowDrawableHTB;
//            label585:
//            paramCanvas.rotate((float)Math.toDegrees(Math.atan2(this.mBezierControl2.y - this.mTouch.y, this.mBezierControl2.x - this.mTouch.x)), this.mBezierControl2.x, this.mBezierControl2.y);
//            if (this.mBezierControl2.y >= 0.0F) {
//                break label896;
//            }
//            f1 = this.mBezierControl2.y - this.mHeight;
//            label669:
//            k = (int)Math.hypot(this.mBezierControl2.x, f1);
//            if (k <= this.mMaxLength) {
//                break label908;
//            }
//            localGradientDrawable.setBounds((int)(this.mBezierControl2.x - 15.0F) - k, i, (int)(this.mBezierControl2.x + this.mMaxLength) - k, j);
//        }
//        for (;;)
//        {
//            localGradientDrawable.draw(paramCanvas);
//            paramCanvas.restore();
//            return;
//            d1 = 0.7853981633974483D - Math.atan2(this.mTouch.y - this.mBezierControl1.y, this.mTouch.x - this.mBezierControl1.x);
//            break;
//            label791:
//            f1 = (float)(this.mTouch.y - d1);
//            break label100;
//            label807:
//            i = (int)(this.mBezierControl1.x - 15.0F);
//            j = (int)this.mBezierControl1.x + 1;
//            localGradientDrawable = this.mFrontShadowDrawableVRL;
//            break label253;
//            label842:
//            k = (int)this.mBezierControl1.y - k - 15;
//            break label401;
//            label861:
//            i = (int)(this.mBezierControl2.y - 15.0F);
//            j = (int)(this.mBezierControl2.y + 1.0F);
//            localGradientDrawable = this.mFrontShadowDrawableHBT;
//            break label585;
//            label896:
//            f1 = this.mBezierControl2.y;
//            break label669;
//            label908:
//            localGradientDrawable.setBounds((int)(this.mBezierControl2.x - this.mMaxLength), i, (int)this.mBezierControl2.x, j);
//        }
//    }
//
//    private void drawNextPageAreaAndShadow(Canvas paramCanvas, Bitmap paramBitmap)
//    {
//        this.mPath1.reset();
//        this.mPath1.moveTo(this.mBezierStart1.x, this.mBezierStart1.y);
//        this.mPath1.lineTo(this.mBeziervertex1.x, this.mBeziervertex1.y);
//        this.mPath1.lineTo(this.mBeziervertex2.x, this.mBeziervertex2.y);
//        this.mPath1.lineTo(this.mBezierStart2.x, this.mBezierStart2.y);
//        this.mPath1.lineTo(this.mCorner.x, this.mCorner.y);
//        this.mPath1.close();
//        this.mDegrees = ((float)Math.toDegrees(Math.atan2(this.mBezierControl1.x - this.mCorner.x, this.mBezierControl2.y - this.mCorner.y)));
//        int i;
//        int j;
//        if (this.mIsRTandLB)
//        {
//            i = (int)this.mBezierStart1.x;
//            j = (int)(this.mBezierStart1.x + this.mTouchToCornerDis / 5.0F);
//        }
//        for (GradientDrawable localGradientDrawable = this.mBackShadowDrawableLR;; localGradientDrawable = this.mBackShadowDrawableRL)
//        {
//            paramCanvas.save();
//            paramCanvas.clipPath(this.mPath0);
//            paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//            paramCanvas.drawBitmap(paramBitmap, 0.0F, 0.0F, null);
//            paramCanvas.rotate(this.mDegrees, this.mBezierStart1.x, this.mBezierStart1.y);
//            localGradientDrawable.setBounds(i, (int)this.mBezierStart1.y, j, (int)(this.mMaxLength + this.mBezierStart1.y));
//            localGradientDrawable.draw(paramCanvas);
//            paramCanvas.restore();
//            this.mPath0.draw(paramCanvas, -65536);
//            this.mPath1.draw(paramCanvas, -16776961);
//            return;
//            i = (int)(this.mBezierStart1.x - this.mTouchToCornerDis / 5.0F);
//            j = (int)this.mBezierStart1.x;
//        }
//    }
//
//    private void drawNextPageAreaAndShadowBlow(Canvas paramCanvas, Bitmap paramBitmap)
//    {
//        this.mPath1.reset();
//        this.mPath1.moveTo(this.mBezierStart1.x, this.mBezierStart1.y);
//        this.mPath1.lineTo(this.mBeziervertex1.x, this.mBeziervertex1.y);
//        this.mPath1.lineTo(this.mBeziervertex2.x, this.mBeziervertex2.y);
//        this.mPath1.lineTo(this.mBezierStart2.x, this.mBezierStart2.y);
//        this.mPath1.lineTo(this.mCorner.x, this.mCorner.y);
//        this.mPath1.close();
//        this.mDegrees = (-1.0F * (float)Math.toDegrees(Math.atan2(this.mBezierControl2.y - this.mCorner.y, this.mBezierControl1.x - this.mCorner.x)));
//        int j;
//        int i;
//        if (this.mIsRTandLB)
//        {
//            j = (int)this.mBezierStart2.y;
//            i = (int)(this.mBezierStart2.y + this.mTouchToCornerDis / 5.0F);
//        }
//        for (paramBitmap = this.mBackShadowDrawableTB;; paramBitmap = this.mBackShadowDrawableBT)
//        {
//            paramCanvas.save();
//            paramCanvas.clipPath(this.mPath0);
//            paramCanvas.clipPath(this.mPath1, Region.Op.INTERSECT);
//            paramCanvas.drawBitmap(this.mNextPageBitmap, 0.0F, 0.0F, null);
//            paramCanvas.rotate(this.mDegrees, this.mBezierStart2.x, this.mBezierStart2.y);
//            paramBitmap.setBounds((int)this.mBezierStart2.x, j, (int)(this.mMaxLength + this.mBezierStart2.x), i);
//            paramBitmap.draw(paramCanvas);
//            paramCanvas.restore();
//            return;
//            j = (int)(this.mBezierStart2.y - this.mTouchToCornerDis / 5.0F);
//            i = (int)this.mBezierStart2.y;
//        }
//    }
//
//    private void drawShade(Canvas paramCanvas, int paramInt1, int paramInt2)
//    {
//        int j = this.mWidth / 2;
//        paramInt2 = this.mWidth / 20;
//        int k = this.mWidth / 50;
//        int i = this.mWidth / 100;
//        GradientDrawable localGradientDrawable1 = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[] { -1728053248, 1711276032 });
//        GradientDrawable localGradientDrawable2 = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[] { 1711276032, 154350387 });
//        paramInt1 = this.mWidth + paramInt1;
//        if (Math.abs(paramInt1) > i)
//        {
//            localGradientDrawable1.setBounds(paramInt1, 0, paramInt1 + i, this.mHeight);
//            localGradientDrawable1.draw(paramCanvas);
//            j = Math.abs(paramInt1 - j) * (paramInt2 - k) / j;
//            paramInt1 += i;
//            localGradientDrawable2.setBounds(paramInt1, 0, paramInt1 + (paramInt2 - j), this.mHeight);
//            localGradientDrawable2.draw(paramCanvas);
//        }
//    }
//
//    private PointF getCross(PointF paramPointF1, PointF paramPointF2, PointF paramPointF3, PointF paramPointF4)
//    {
//        PointF localPointF = new PointF();
//        float f1 = (paramPointF2.y - paramPointF1.y) / (paramPointF2.x - paramPointF1.x);
//        float f2 = (paramPointF1.x * paramPointF2.y - paramPointF2.x * paramPointF1.y) / (paramPointF1.x - paramPointF2.x);
//        float f3 = (paramPointF4.y - paramPointF3.y) / (paramPointF4.x - paramPointF3.x);
//        localPointF.x = (((paramPointF3.x * paramPointF4.y - paramPointF4.x * paramPointF3.y) / (paramPointF3.x - paramPointF4.x) - f2) / (f1 - f3));
//        localPointF.y = (localPointF.x * f1 + f2);
//        return localPointF;
//    }
//
//    private void init()
//    {
//        this.mPath0 = new Path();
//        this.mPath1 = new Path();
//        createDrawable();
//        this.mPaint = new Paint();
//        this.mPaint.setStyle(Paint.Style.FILL);
//        this.showSpeedPaint = new Paint();
//        this.showSpeedPaint.setStyle(Paint.Style.FILL);
//        this.showSpeedPaint.setTextSize(TypedValue.applyDimension(1, 22.0F, getContext().getResources().getDisplayMetrics()));
//        this.showSpeedPaint.setColor(-1);
//        this.showSpeedPaint.setAntiAlias(true);
//        this.showSpeedBG = BitmapFactory.decodeResource(getResources(), 2130837605);
//        ColorMatrix localColorMatrix = new ColorMatrix();
//        localColorMatrix.set(new float[] { 0.55F, 0.0F, 0.0F, 0.0F, 80.0F, 0.0F, 0.55F, 0.0F, 0.0F, 80.0F, 0.0F, 0.0F, 0.55F, 0.0F, 80.0F, 0.0F, 0.0F, 0.0F, 0.2F, 0.0F });
//        this.mColorMatrixFilter = new ColorMatrixColorFilter(localColorMatrix);
//        this.mMatrix = new Matrix();
//        this.mScroller = new Scroller(getContext());
//        this.mTouch.x = 0.01F;
//        this.mTouch.y = 0.01F;
//    }
//
//    public void abortAnimation()
//    {
//        if (!this.mScroller.isFinished()) {
//            this.mScroller.abortAnimation();
//        }
//        this.mTouch.x = this.mCorner.x;
//        this.mTouch.y = this.mCorner.y;
//        this.motionEventAction = -1;
//    }
//
//    protected PointF adjust(PointF paramPointF)
//    {
//        float f2 = 1.0F;
//        if (paramPointF.x < 1.0F)
//        {
//            f1 = 1.0F;
//            paramPointF.x = f1;
//            if (paramPointF.x <= this.mWidth - 1) {
//                break label100;
//            }
//            f1 = this.mWidth - 1;
//            label41:
//            paramPointF.x = f1;
//            if (paramPointF.y >= 1.0F) {
//                break label108;
//            }
//            f1 = f2;
//            label57:
//            paramPointF.y = f1;
//            if (paramPointF.y <= this.mHeight - 1) {
//                break label116;
//            }
//        }
//        label100:
//        label108:
//        label116:
//        for (float f1 = this.mHeight - 1;; f1 = paramPointF.y)
//        {
//            paramPointF.y = f1;
//            return paramPointF;
//            f1 = paramPointF.x;
//            break;
//            f1 = paramPointF.x;
//            break label41;
//            f1 = paramPointF.y;
//            break label57;
//        }
//    }
//
//    public void backgroundChanged(boolean paramBoolean1, String paramString, boolean paramBoolean2, int paramInt)
//    {
//        this.backgroundColor = paramInt;
//        this.backgroundUsedBitmap = paramBoolean1;
//        this.backgroundBitmapName = paramString;
//        this.backgroundBitmapIsTiled = paramBoolean2;
//        this.backgroundBitmap = Res.getDrawable(getContext(), paramString, paramBoolean2);
//        if (this.backgroundBitmap != null) {
//            this.backgroundBitmap.setBounds(0, 0, this.mWidth, this.mHeight);
//        }
//    }
//
//    public void calcCornerXY(float paramFloat1, float paramFloat2)
//    {
//        if (paramFloat1 <= this.mWidth / 2)
//        {
//            this.mCorner.x = 0.0F;
//            if (paramFloat2 > this.mHeight / 2) {
//                break label117;
//            }
//        }
//        label117:
//        for (this.mCorner.y = 0.0F;; this.mCorner.y = this.mHeight)
//        {
//            if (((this.mCorner.x != 0.0F) || (this.mCorner.y != this.mHeight)) && ((this.mCorner.x != this.mWidth) || (this.mCorner.y != 0.0F))) {
//                break label132;
//            }
//            this.mIsRTandLB = true;
//            return;
//            this.mCorner.x = this.mWidth;
//            break;
//        }
//        label132:
//        this.mIsRTandLB = false;
//    }
//
//    public void clearAllPaper()
//    {
//        this.mPageCanvas = null;
//        PLog.i("Canvas  is  null");
//    }
//
//    public boolean computePaperScroll()
//    {
//        super.computeScroll();
//        if (this.animateType != 3)
//        {
//            if (this.mScroller.isFinished()) {}
//            for (;;)
//            {
//                return true;
//                if (this.mScroller.computeScrollOffset())
//                {
//                    float f1 = this.mScroller.getCurrX();
//                    float f2 = this.mScroller.getCurrY();
//                    Log.d("", "我在背循环调用");
//                    this.mTouch.x = f1;
//                    this.mTouch.y = f2;
//                    invalidate();
//                }
//            }
//        }
//        return false;
//    }
//
//    public boolean doTouchEvent(MotionEvent paramMotionEvent)
//    {
//        if (this.mCurrentOrientation == 0) {
//            return false;
//        }
//        if ((this.moveFirst) || (paramMotionEvent.getAction() == 0))
//        {
//            this.motionEventAction = 0;
//            this.mTouch.x = paramMotionEvent.getX();
//            this.mTouch.y = paramMotionEvent.getY();
//            this.mPressed.x = paramMotionEvent.getX();
//            this.mPressed.y = paramMotionEvent.getY();
//            this.mTouch = adjust(this.mTouch);
//            this.mPressed = adjust(this.mPressed);
//        }
//        label251:
//        do
//        {
//            do
//            {
//                PLog.i("总之我被调用了");
//                return true;
//                if (paramMotionEvent.getAction() != 2) {
//                    break;
//                }
//            } while (this.motionEventAction < 0);
//            this.motionEventAction = 2;
//            if (((this.animateType == 2) || (this.animateType == 4)) && (this.mTouch.x == this.mPressed.x) && (this.mTouch.y == this.mPressed.y)) {
//                if (paramMotionEvent.getX() >= this.mPressed.x) {
//                    break label251;
//                }
//            }
//            for (this.mPressed.x = (paramMotionEvent.getX() + 1.0F);; this.mPressed.x = (paramMotionEvent.getX() - 1.0F))
//            {
//                this.mTouch.x = paramMotionEvent.getX();
//                this.mTouch.y = paramMotionEvent.getY();
//                this.mTouch = adjust(this.mTouch);
//                PLog.i("我在move时 被调用");
//                invalidate();
//                break;
//            }
//        } while ((paramMotionEvent.getAction() != 1) || (this.motionEventAction < 0));
//        this.motionEventAction = 1;
//        if (((this.animateType == 2) || (this.animateType == 4)) && (this.mTouch.x == this.mPressed.x) && (this.mTouch.y == this.mPressed.y)) {
//            if (paramMotionEvent.getX() >= this.mPressed.x) {
//                break label374;
//            }
//        }
//        label374:
//        for (this.mPressed.x = (paramMotionEvent.getX() + 1.0F);; this.mPressed.x = (paramMotionEvent.getX() - 1.0F))
//        {
//            invalidate();
//            break;
//        }
//    }
//
//    public void drawTwoPaper(Reader paramReader)
//    {
//        PLog.i("bitmap转化canvas");
//        drawTwoPaper(paramReader, false);
//    }
//
//    public void drawTwoPaper(Reader paramReader, boolean paramBoolean)
//    {
//        if (this.mCurrentOrientation == 0) {
//            this.motionEventAction = -1;
//        }
//        if (this.mPageCanvas == null)
//        {
//            PLog.i("bitmap转化canvas---null");
//            this.mPageCanvas = new Canvas();
//            this.mPageCanvas.setBitmap(this.mCurPageBitmap);
//            paintBackground(this.mPageCanvas);
//            paramReader.onDraw(this, this.mPageCanvas, 0);
//            this.mPageCanvas.setBitmap(this.mNextPageBitmap);
//            paintBackground(this.mPageCanvas);
//            paramReader.onDraw(this, this.mPageCanvas, this.mCurrentOrientation);
//            return;
//        }
//        if (paramBoolean)
//        {
//            this.mPageCanvas.setBitmap(this.mCurPageBitmap);
//            paintBackground(this.mPageCanvas);
//            paramReader.onDraw(this, this.mPageCanvas, 0);
//            this.mPageCanvas.setBitmap(this.mNextPageBitmap);
//            paintBackground(this.mPageCanvas);
//            paramReader.onDraw(this, this.mPageCanvas, this.mCurrentOrientation);
//            return;
//        }
//        PLog.i("bitmap转化canvas---object");
//        PLog.i("info", "move ---- 交换()");
//        Bitmap localBitmap = this.mCurPageBitmap;
//        this.mCurPageBitmap = this.mNextPageBitmap;
//        this.mNextPageBitmap = localBitmap;
//        this.mPageCanvas.setBitmap(this.mNextPageBitmap);
//        paintBackground(this.mPageCanvas);
//        PLog.i("" + this.mCurrentOrientation);
//        paramReader.onDraw(this, this.mPageCanvas, this.mCurrentOrientation);
//    }
//
//    public boolean isAnimateFinish()
//    {
//        return this.mScroller.isFinished();
//    }
//
//    public boolean isTrunback()
//    {
//        return this.mCurrentOrientation == -1;
//    }
//
//    public void makeOnClick()
//    {
//        this.mPressed.x = this.mTouch.x;
//    }
//
//    public void noPaperOnDraw()
//    {
//        this.mCurrentOrientation = 0;
//    }
//
//    protected boolean onPaperDraw(Canvas paramCanvas)
//    {
//        if ((this.mCurrentOrientation == 0) && (this.animateType != 6))
//        {
//            this.motionEventAction = -1;
//            return false;
//        }
//        switch (this.animateType)
//        {
//            case 3:
//            default:
//                return false;
//            case 1:
//                calcPoints();
//                paramCanvas.drawColor(this.backgroundColor);
//                drawCurrentPageArea(paramCanvas, this.mCurPageBitmap, this.mPath0);
//                drawNextPageAreaAndShadow(paramCanvas, this.mNextPageBitmap);
//                drawCurrentPageShadow(paramCanvas);
//                drawCurrentBackArea(paramCanvas, this.mCurPageBitmap);
//        }
//        for (;;)
//        {
//            return true;
//            int j;
//            int i;
//            if (this.mCurrentOrientation == 1)
//            {
//                j = (int)(this.mTouch.x - this.mPressed.x);
//                i = j;
//                if (j > 0) {
//                    i = 0;
//                }
//                if ((this.motionEventAction == 2) || (this.motionEventAction == 1))
//                {
//                    paramCanvas.drawBitmap(this.mNextPageBitmap, 0.0F, 0.0F, null);
//                    paramCanvas.drawBitmap(this.mCurPageBitmap, i, 0.0F, null);
//                    if (this.motionEventAction == 1)
//                    {
//                        StringBuilder localStringBuilder = new StringBuilder();
//                        j = this.s;
//                        this.s = (j + 1);
//                        Log.d("", j + "次");
//                    }
//                    drawShade(paramCanvas, i, this.mCurrentOrientation);
//                }
//                else
//                {
//                    paramCanvas.drawBitmap(this.mCurPageBitmap, 0.0F, 0.0F, null);
//                }
//            }
//            else if (this.mCurrentOrientation == -1)
//            {
//                i = (int)(this.mTouch.x - this.mPressed.x - this.mWidth);
//                if ((this.motionEventAction == 2) || (this.motionEventAction == 1))
//                {
//                    paramCanvas.drawBitmap(this.mCurPageBitmap, 0.0F, 0.0F, null);
//                    paramCanvas.drawBitmap(this.mNextPageBitmap, i, 0.0F, null);
//                    drawShade(paramCanvas, i, this.mCurrentOrientation);
//                }
//                else
//                {
//                    paramCanvas.drawBitmap(this.mCurPageBitmap, 0.0F, 0.0F, null);
//                    continue;
//                    if (this.autoReadYOffset < 0.0F) {
//                        this.autoReadYOffset = 0.0F;
//                    }
//                    this.currentBitmapRect.top = 0;
//                    this.currentBitmapRect.bottom = ((int)this.autoReadYOffset);
//                    paramCanvas.drawBitmap(this.mNextPageBitmap, this.currentBitmapRect, this.currentBitmapRect, null);
//                    this.currentBitmapRect.top = ((int)this.autoReadYOffset);
//                    this.currentBitmapRect.bottom = getHeight();
//                    paramCanvas.drawBitmap(this.mCurPageBitmap, this.currentBitmapRect, this.currentBitmapRect, null);
//                    paramCanvas.drawBitmap(this.autoLine, 0.0F, this.autoReadYOffset - this.autoLineHeightOffset, null);
//                    if (i_VolumePress > 1)
//                    {
//                        i_VolumePress -= 1;
//                        paramCanvas.drawBitmap(this.showSpeedBG, (getWidth() - this.showSpeedBG.getWidth()) / 2, (getHeight() - this.showSpeedBG.getHeight()) / 2, null);
//                        i = (int)this.autoReadRawSpeed;
//                        float f1 = (getWidth() - this.showSpeedPaint.measureText(String.valueOf(i * 10))) / 2.0F;
//                        if (this.fm == null)
//                        {
//                            this.fm = new Paint.FontMetrics();
//                            this.showSpeedPaint.getFontMetrics(this.fm);
//                        }
//                        float f2 = (getHeight() - this.fm.ascent - this.fm.descent) / 2.0F;
//                        paramCanvas.drawText(String.valueOf((int)(this.autoReadRawSpeed * 10.0F)), f1, f2, this.showSpeedPaint);
//                        continue;
//                        if (this.mCurrentOrientation == 1)
//                        {
//                            j = (int)(this.mTouch.x - this.mPressed.x);
//                            i = j;
//                            if (j < -this.mWidth) {
//                                i = -this.mWidth;
//                            }
//                            j = i;
//                            if (i > 0) {
//                                j = 0;
//                            }
//                            PLog.i("temp", "dx:" + j);
//                            if ((this.motionEventAction == 2) || (this.motionEventAction == 1))
//                            {
//                                paramCanvas.drawBitmap(this.mNextPageBitmap, this.mWidth + j, 0.0F, null);
//                                paramCanvas.drawBitmap(this.mCurPageBitmap, j, 0.0F, null);
//                            }
//                            else
//                            {
//                                paramCanvas.drawBitmap(this.mCurPageBitmap, 0.0F, 0.0F, null);
//                            }
//                        }
//                        else if (this.mCurrentOrientation == -1)
//                        {
//                            j = (int)(this.mTouch.x - this.mPressed.x - this.mWidth);
//                            i = j;
//                            if (j > 0) {
//                                i = 0;
//                            }
//                            j = i;
//                            if (i < -this.mWidth) {
//                                j = -this.mWidth;
//                            }
//                            if ((this.motionEventAction == 2) || (this.motionEventAction == 1))
//                            {
//                                paramCanvas.drawBitmap(this.mCurPageBitmap, this.mWidth + j, 0.0F, null);
//                                paramCanvas.drawBitmap(this.mNextPageBitmap, j, 0.0F, null);
//                            }
//                            else
//                            {
//                                paramCanvas.drawBitmap(this.mCurPageBitmap, 0.0F, 0.0F, null);
//                                continue;
//                                calcPointsBlow();
//                                paramCanvas.drawColor(this.backgroundColor);
//                                drawCurrentPageArea(paramCanvas, this.mCurPageBitmap, this.mPath0);
//                                drawNextPageAreaAndShadowBlow(paramCanvas, this.mNextPageBitmap);
//                                drawCurrentPageShadowBlow(paramCanvas);
//                                drawCurrentBackAreaBlow(paramCanvas, this.mCurPageBitmap);
//                            }
//                        }
//                    }
//                }
//            }
//        }
//    }
//
//    public void onSizeChanged(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
//    {
//        if (paramInt1 * paramInt2 == 0) {}
//        do
//        {
//            return;
//            super.onSizeChanged(paramInt1, paramInt2, paramInt3, paramInt4);
//        } while ((this.mWidth == paramInt1) && (this.mHeight >= paramInt2));
//        this.mWidth = paramInt1;
//        this.mHeight = paramInt2;
//        this.mMaxLength = ((float)Math.hypot(this.mWidth, this.mHeight));
//        this.currentBitmapRect = new Rect(0, (int)this.autoReadYOffset, this.mWidth, this.mHeight);
//        Bitmap localBitmap = BitmapFactory.decodeResource(getResources(), 2130837604);
//        this.autoLineHeightOffset = (localBitmap.getHeight() / 2);
//        this.autoLine = Bitmap.createBitmap(this.mWidth, this.autoLineHeightOffset * 2, Bitmap.Config.ARGB_8888);
//        BitmapDrawable localBitmapDrawable = new BitmapDrawable(getResources(), localBitmap);
//        localBitmapDrawable.setTileModeX(Shader.TileMode.REPEAT);
//        localBitmapDrawable.setGravity(119);
//        localBitmapDrawable.setBounds(0, 0, this.mWidth, this.autoLineHeightOffset * 2);
//        localBitmapDrawable.draw(new Canvas(this.autoLine));
//        localBitmap.recycle();
//        recycle();
//        try
//        {
//            this.mCurPageBitmap = Bitmap.createBitmap(this.mWidth, this.mHeight, Bitmap.Config.ARGB_8888);
//            this.mNextPageBitmap = Bitmap.createBitmap(this.mWidth, this.mHeight, Bitmap.Config.ARGB_8888);
//            this.mCurrentOrientation = 0;
//            return;
//        }
//        catch (OutOfMemoryError localOutOfMemoryError)
//        {
//            for (;;)
//            {
//                localOutOfMemoryError.printStackTrace();
//            }
//        }
//    }
//
//    protected void paintBackground(Canvas paramCanvas)
//    {
//        paramCanvas.drawColor(this.backgroundColor);
//        if ((this.backgroundUsedBitmap) && (this.backgroundBitmap == null) && (!TextUtils.isEmpty(this.backgroundBitmapName))) {
//            this.backgroundBitmap = Res.getDrawable(getContext(), this.backgroundBitmapName, this.backgroundBitmapIsTiled);
//        }
//        if ((this.backgroundUsedBitmap) && (this.backgroundBitmap != null) && (!TextUtils.isEmpty(this.backgroundBitmapName))) {
//            this.backgroundBitmap.draw(paramCanvas);
//        }
//    }
//
//    public void recycle()
//    {
//        this.backgroundBitmap = null;
//        if ((this.mCurPageBitmap != null) && (!this.mCurPageBitmap.isRecycled())) {
//            this.mCurPageBitmap.recycle();
//        }
//        this.mCurPageBitmap = null;
//        if ((this.mNextPageBitmap != null) && (!this.mNextPageBitmap.isRecycled())) {
//            this.mNextPageBitmap.recycle();
//        }
//        this.mNextPageBitmap = null;
//        this.mPageCanvas = null;
//    }
//
//    public void setAnimation(int paramInt)
//    {
//        this.animateType = paramInt;
//    }
//
//    public void setScreen(int paramInt1, int paramInt2)
//    {
//        this.mWidth = paramInt1;
//        this.mHeight = paramInt2;
//    }
//
//    public boolean startAnimation()
//    {
//        if (!this.mScroller.isFinished())
//        {
//            PLog.i("info", "PaperWidget ---- abortAnimation()");
//            this.mScroller.abortAnimation();
//        }
//        if (this.mCurrentOrientation == 0) {
//            return false;
//        }
//        Bitmap localBitmap;
//        if (this.mCurrentOrientation == 1)
//        {
//            if ((this.mPressed.x - this.mTouch.x < 0.0F) && (((this.mCorner.y > 10.0F) && (this.mPressed.y - this.mTouch.y < 0.0F)) || ((this.mCorner.y < 10.0F) && (this.mPressed.y - this.mTouch.y > 0.0F))))
//            {
//                localBitmap = this.mCurPageBitmap;
//                this.mCurPageBitmap = this.mNextPageBitmap;
//                this.mNextPageBitmap = localBitmap;
//                this.motionEventAction = -1;
//                PLog.i("info", "UP ---- 松开手时交换()");
//                return false;
//            }
//        }
//        else if ((this.mCurrentOrientation == -1) && (this.mPressed.x - this.mTouch.x > 0.0F) && (((this.mCorner.y > 10.0F) && (this.mPressed.y - this.mTouch.y < 0.0F)) || ((this.mCorner.y < 10.0F) && (this.mPressed.y - this.mTouch.y > 0.0F))))
//        {
//            localBitmap = this.mCurPageBitmap;
//            this.mCurPageBitmap = this.mNextPageBitmap;
//            this.mNextPageBitmap = localBitmap;
//            this.motionEventAction = -1;
//            return false;
//        }
//        int i;
//        switch (this.animateType)
//        {
//            case 3:
//            default:
//            case 2:
//            case 1:
//            case 4:
//                for (;;)
//                {
//                    invalidate();
//                    return true;
//                    if (this.mCurrentOrientation == 1)
//                    {
//                        i = this.mWidth - (int)(this.mPressed.x - this.mTouch.x);
//                        j = i * 1000 / this.mWidth;
//                        this.mScroller.startScroll((int)this.mTouch.x, 0, -i, 0, j);
//                    }
//                    else if (this.mCurrentOrientation == -1)
//                    {
//                        i = this.mWidth + (int)(this.mPressed.x - this.mTouch.x);
//                        j = i * 1000 / this.mWidth;
//                        this.mScroller.startScroll((int)this.mTouch.x, 0, i, 0, j - 200);
//                    }
//                    else
//                    {
//                        return false;
//                        if (this.mCorner.x > 0.0F)
//                        {
//                            i = -(int)(this.mWidth + this.mTouch.x);
//                            label491:
//                            if (this.mCorner.y <= 0.0F) {
//                                break label577;
//                            }
//                        }
//                        label577:
//                        for (j = (int)(this.mHeight - 1 - this.mTouch.y);; j = (int)(1.0F - this.mTouch.y))
//                        {
//                            this.mScroller.startScroll((int)this.mTouch.x, (int)this.mTouch.y, i, j, 1300);
//                            break;
//                            i = (int)(this.mWidth - this.mTouch.x + this.mWidth - 1.0F);
//                            break label491;
//                        }
//                        if (this.mCurrentOrientation == 1)
//                        {
//                            i = this.mWidth - (int)(this.mPressed.x - this.mTouch.x);
//                            j = i * 1000 / this.mWidth;
//                            this.mScroller.startScroll((int)this.mTouch.x, 0, -i, 0, j);
//                        }
//                        else
//                        {
//                            if (this.mCurrentOrientation != -1) {
//                                break;
//                            }
//                            i = this.mWidth + (int)(this.mPressed.x - this.mTouch.x);
//                            j = i * 1000 / this.mWidth;
//                            this.mScroller.startScroll((int)this.mTouch.x, 0, i, 0, j - 200);
//                        }
//                    }
//                }
//                return false;
//        }
//        if (this.mCorner.x > 0.0F)
//        {
//            i = (int)(this.mWidth - this.mTouch.x - 1.0F);
//            label753:
//            if (this.mCorner.y <= 0.0F) {
//                break label827;
//            }
//        }
//        label827:
//        for (int j = (int)(1.0F - this.mTouch.y - this.mHeight);; j = (int)(this.mHeight + this.mHeight - this.mTouch.y - 1.0F))
//        {
//            this.mScroller.startScroll((int)this.mTouch.x, (int)this.mTouch.y, i, j, 1300);
//            break;
//            i = (int)(1.0F - this.mTouch.x);
//            break label753;
//        }
//    }
//
//    public void turnPage(Reader paramReader, int paramInt)
//    {
//        abortAnimation();
//        if (paramInt != 0)
//        {
//            PointF localPointF = new PointF(1.0F, 1.0F);
//            if (paramInt == 1)
//            {
//                localPointF.x = (this.mWidth - 1);
//                localPointF.y = (this.mHeight - 1);
//            }
//            calcCornerXY(localPointF.x, localPointF.y);
//            this.mCurrentOrientation = paramInt;
//            drawTwoPaper(paramReader);
//            paramReader = adjust(localPointF);
//            this.motionEventAction = 1;
//            this.mTouch.x = paramReader.x;
//            this.mTouch.y = paramReader.y;
//            this.mPressed.x = paramReader.x;
//            this.mPressed.y = paramReader.y;
//            startAnimation();
//        }
//    }
//}
//
